﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Perceiveit.Xml.Converters
{

    #region public class SByteXConverter : XConverter<sbyte>

    public class SByteXConverter : XConverter<sbyte>
    {
        public override sbyte FromString(string value)
        {
            sbyte b;
            if (string.IsNullOrEmpty(value) || !sbyte.TryParse(value, out b))
                b = 0;

            return b;
        }

        public override string ToString(sbyte value)
        {
            return value.ToString();
        }
    }

    #endregion

    
}
